package com.study.spmongodb.book.wwj.char21;

import javax.security.auth.login.Configuration;

/**
 * @author MI
 * @version 1.0
 * @date 2020/11/30 16:47
 */
public class ActionContext {
    private static final ThreadLocal<Context> context =
            ThreadLocal.withInitial(Context::new);

    public static Context get() {
        return context.get();
    }

    static class Context {
        //在context 中的其他成员
        private Configuration configuration;

        public Configuration getConfiguration() {
            return configuration;
        }

        public void setConfiguration(Configuration configuration) {
            this.configuration = configuration;
        }
    }
}
